﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;

namespace Student_management
{
    class HocSinh
    {
        public string MaHS;
        public string TenHS;
        public string GioiTinh;
        public string DiaChi;
        public DateTime NgaySinh;
        public string MaLop;
        public string Email;
        public string SDT;
    }
    class Diem
    {
        public string MaHS;
        public string MaMon;
        public string MaHK;
        public string D15P;
        public string D1Tiet;
        public string DHK;
        public string DTB;
        public void TinhDiem()
        {

            if (D15P != null && D1Tiet != null && DHK != null && D15P != "" && D1Tiet != "" && DHK != "")
                DTB = String.Format("{0:0.##}", (float.Parse(D15P.Replace(",", "."), CultureInfo.InvariantCulture) + float.Parse(D1Tiet.Replace(",", "."), CultureInfo.InvariantCulture) * 2 + float.Parse(DHK.Replace(",", "."), CultureInfo.InvariantCulture) * 3) / 6).Replace(",", ".");
            else
                DTB = null;
        }
    }
}
